package com.asset.dispoal.defaultCompanyRole.service;

import com.asset.dispoal.defaultCompanyRole.api.IGbDefaultCompanyRoleService;
import com.asset.dispoal.defaultCompanyRole.dto.GbDefaultCompanyRoleRequest;
import com.asset.dispoal.defaultCompanyRole.dto.GbDefaultCompanyRoleResponse;
import com.asset.dispoal.defaultCompanyRole.service.commom.GbDefaultCompanyRoleDel;
import com.asset.dispoal.defaultCompanyRole.service.commom.GbDefaultCompanyRoleInsert;
import com.asset.dispoal.defaultCompanyRole.service.commom.GbDefaultCompanyRoleQueryPage;
import com.asset.dispoal.defaultCompanyRole.service.commom.GbDefaultCompanyRoleUpdate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.mhuang.pacebox.springboot.protocol.Result;
import tech.mhuang.pacebox.springboot.protocol.data.PageVO;


/**
 * 默认公司角色表服务实现类
 *
 * @author: mhuang
 * @date: 2022-03-17 14:54:00
 */
@Service
public class GbDefaultCompanyRoleServiceImpl implements IGbDefaultCompanyRoleService {

    @Autowired
    GbDefaultCompanyRoleDel gbDefaultCompanyRoleDel;
    @Autowired
    GbDefaultCompanyRoleInsert gbDefaultCompanyRoleInsert;
    @Autowired
    GbDefaultCompanyRoleQueryPage gbDefaultCompanyRoleQueryPage;
    @Autowired
    GbDefaultCompanyRoleUpdate gbDefaultCompanyRoleUpdate;


    @Override
    public Result insert(GbDefaultCompanyRoleRequest request) {
        return gbDefaultCompanyRoleInsert.execute(request);
    }

    @Override
    public Result update(GbDefaultCompanyRoleRequest request) {
        return gbDefaultCompanyRoleUpdate.execute(request);
    }

    @Override
    public Result delete(String id) {
        return gbDefaultCompanyRoleDel.execute(id);
    }

    @Override
    public Result<PageVO<GbDefaultCompanyRoleResponse>> queryPage(GbDefaultCompanyRoleRequest request) {
        final Result<PageVO<GbDefaultCompanyRoleResponse>> execute = gbDefaultCompanyRoleQueryPage.execute(request);
        return execute;
    }
}